<template>
  <div>
    <el-dialog
      title="标题"
      :visible.sync="adddialogVisible"
      @close="adddiglogClose"
    >
      <el-form
        :model="queryForm"
        :rules="rules"
        ref="queryForm"
        label-width="100px"
      >
        <el-form-item :label="label" prop="attr_name">
          <el-input v-model="queryForm.attr_name"></el-input>
        </el-form-item>
        <!-- <el-form-item :label="label" prop="attr_name">
          <el-input v-model="queryForm.attr_name"></el-input>
        </el-form-item>
        <el-form-item :label="label" prop="attr_name">
          <el-input v-model="queryForm.attr_name"></el-input>
        </el-form-item> -->
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="adddialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="changeattr()">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "dialogbox",
  props: {
    dialogtitle: {},
  },
  data() {
    return {
      queryForm: [],
      rules: {
        attr_name: [
          { required: true, message: "请输入内容", trigger: "blur" },
          {
            min: 5,
            max: 12,
            message: "长度在 5 到 12 个字符",
            trigger: "blur",
          },
        ],
      },
      adddialogVisible: false,
    };
  },
  methods: {
    adddiglogClose() {
      this.adddialogVisible = false;
      this.queryForm.attr_name = "";
    },
    changeattr() {
      console.log("11");
    },
  },
};
</script>

<style lang="less" scoped></style>
